import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    shopID: [], // 商品ID
    shopCount: [], // 商品ID对应的购买数量
    shopSelect: [] // 商品选中项
  },
  mutations: {
    getID(state, data) {
      state.shopID.push(data);
    },
    getCount(state, data) {
      state.shopCount.push(data);
    },
    getSelect(state, data) {
      state.shopSelect.push(data);
    },
  },
  actions: {},
  modules: {}
})
